<template>
  <div class="content-wrap">
    <Button @click="handleOpen1">按钮1</Button>
    <div></div>
    <el-button type="primary" @click="handleOpen1" style="margin-top: 300px">
      按钮2
    </el-button>
    <div style="text-align: right">
      <el-button
        type="primary"
        @click="handleOpen22"
        style="margin-left: 800px"
      >
        按钮3
      </el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import { Modal, Button } from "leisure-lib";
import myDetail from "./my-detail.vue";
import myItemDetail from "./my-item-detail.vue";

const handleOpen22 = () => {
  Modal.open("hh").then((res) => {
    console.log("🚀 ~ Modal.open ~ res:", res);
    
  });
};

const handleOpen1 = () => {
  Modal.open(myDetail, {
    title: "wodemingzi",
    width: 850,
    footer: false,
    // onClose: () => {
    //   console.log("click close");
    // },
    // onOk: (comp) => {
    //   console.log("click ok", comp);
    //   Modal.open(myItemDetail, {
    //     title: "myItemDetail",
    //   });
    // },
  }).then((res) => {
    console.log(res);
  });

  setTimeout(() => {
    // modal.close();
  }, 2000);
};
</script>

<style scoped></style>
